-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add offerHa and forceHa preset variables to RUNNING_VM usage type
#9500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add offerHa and forceHa preset variables to RUNNING_VM usage type
#9500
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9500 +/- ##
=========================================
Coverage 16.06% 16.06%
- Complexity 12864 12874 +10
=========================================
Files 5642 5643 +1
Lines 493856 493904 +48
Branches 59860 59863 +3
=========================================
+ Hits 79326 79370 +44
- Misses 405749 405751 +2
- Partials 8781 8783 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
...in/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelper.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Fabricio Duarte <[email protected]>
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
...in/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelper.java
Show resolved
Hide resolved
|
there is a build error @lucas-a-martins , please have a look. |
winterhazel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just need to fix the build.
I debugged the code to see what values were injected into value.computeOffering.offerHa and value.configuration.forceHa on different scenarios, and verified that they had the expected value.
-
value.computeOffering.offerHa:falsewhen the offering does not offer HAtruewhen the offering offers HA
-
configuration.forceHatruewhenforce.hais set totrueon cluster-levelfalsewhenforce.hais set tofalseon cluster-leveltruewhen not set on cluster-level, but the global setting is set totruefalsewhen not set on cluster-level, but the global setting is set tofalse
@DaanHoogland |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11811 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11907)
|
I checked the test errors and both are unrelated with the PR |
…pe (apache#9500) * Add offerHA and forceHa presets to Running VM * apply winterhazel's suggestion Co-authored-by: Fabricio Duarte <[email protected]> * Add ObjectUtils import --------- Co-authored-by: Lucas Martins <[email protected]> Co-authored-by: Fabricio Duarte <[email protected]>
Description
This PR adds the following preset variables to the usage type
RUNNING_VM:value.computeOffering.offerHa: A boolean informing if the compute offering offers HA or not.configuration.forceHa: A boolean informing if the cluster configurationforce.hais enabled or not. Considering thatforce.hais a configuration at cluster scope, the priority is to get the value from the cluster. If no value is specified in the cluster scope, the variable will use the global settings value.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
To test the
offerHavariable, I created a VM using a compute offering whereofferHa=trueand the following tariff. As shown in the first screenshot above, the tariff was applied as expected.Then, I tested the
forceHavariable by using the following tariff:These are the results of my tests by changing the
force.havalues in both the cluster and global settings: